
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<link rel="stylesheet" media="all" href="${pageContext.request.contextPath}/layui/css/layui.css">
<script src="${pageContext.request.contextPath}/layui/layui.js"></script>
<script src="${pageContext.request.contextPath}/echarts/echarts.js"></script>
<script src="${pageContext.request.contextPath}/js/html2canvas.js"></script>
<script src="${pageContext.request.contextPath}/js/jspdf.debug.js"></script>


<html>
<head>
    <title>我的layui页面</title>

</head>
<body>

<table id="demo" lay-filter="test"></table>
<script>
    layui.use(['table', 'form', 'upload'], function () {
        var table = layui.table

        //第一个实例 表格渲染
        table.render({
            elem: '#demo'
            , height: 550
            , url: '${pageContext.request.contextPath}/log/findAllLog.do' //数据接口
            , page: true //开启分页
            , method: 'post'
            , autoSort: true //禁用前端自动排序
            , cols: [[ //表头
                {field: 'id', title: 'ID', width: 120, sort: true,fixed:'left'}
                , {field: 'loginName', title: '登录名', width: 120}
                , {field: 'userName', title: '用户名', width: 120}
                , {field: 'ip', title: 'IP', width: 140}
                , {field: 'className', title: '类名', width: 180}
                , {field: 'methodName', title: '方法名', width: 180}
                , {field: 'params', title: '参数', width: 180, sort: true}
                , {field: 'createTime', title: '创建时间', width: 140}
            ]]
        });
    });
</script>
</body>
</html>
